<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Babylon.js Generated Template</title>

    <script
      src="./node_modules/es6-promise/dist/es6-promise.auto.js"
      type="text/javascript"
    ></script>
    <script
      src="./node_modules/systemjs/dist/system.js"
      type="text/javascript"
    ></script>

    <style rel="stylesheet" type="text/css">
      html,
      body {
        overflow: hidden;
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
      }

      #renderCanvas {
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        touch-action: none;
        -ms-touch-action: none;
      }
    </style>
  </head>
  <body>
    <canvas id="renderCanvas"></canvas>

    <script type="text/javascript">
      const importMap = {
        paths: {
          babylonjs: "./node_modules/babylonjs/babylon.max.js",
          "babylonjs-gui": "./node_modules/babylonjs-gui/babylon.gui.min.js",
          "babylonjs-materials":
            "./node_modules/babylonjs-materials/babylonjs.materials.js",
          "babylonjs-loaders":
            "./node_modules/babylonjs-loaders/babylonjs.loaders.js",
          "babylonjs-serializers":
            "./node_modules/babylonjs-serializers/babylonjs.serializers.js",
          "babylonjs-procedural-textures":
            "./node_modules/babylonjs-procedural-textures/babylonjs.proceduralTextures.js",
          "babylonjs-post-process":
            "./node_modules/babylonjs-post-process/babylonjs.postProcess.js",

          "babylonjs-editor":
            "./node_modules/babylonjs-editor/dist/editor.extensions.js",

          cannon: "./node_modules/cannon/build/cannon.js",
          earcut: "./node_modules/earcut/dist/earcut.min.js",
          oimo: "./node_modules/babylonjs/Oimo.js",
          "javascript-astar": "./node_modules/javascript-astar/astar.js",
          "litegraph.js": "./node_modules/litegraph.js/build/litegraph.js"
        },
        packages: {
          "./build/": {
            defaultExtension: "js"
          },
          "./node_modules/babylonjs-loaders/": {
            format: "cjs",
            main: "babylonjs.loaders.js",
            format: "global"
          }
        },
        map: {
          css: "./node_modules/systemjs-plugin-css/css.js"
        },
        meta: {
          "*.css": { loader: "css" },
          cannon: { format: "global" },
          "javascript-astar": { format: "global" }
        },
        pluginFirst: true
      };

      window.System.config(importMap);
    </script>

    <script type="text/javascript">
      window.System.import("./build/src/game.js").then(function(e) {
        // Run game here
        var e = new e.default();
        e.run();
      });
    </script>
  </body>
</html>
